Diet can alter the cost of resistance to a natural parasite in Caenorhabditis elegans

Abstract Resistance to parasites confers a fitness advantage, yet hosts show substantial variation in resistance in natural populations. Evolutionary theory indicates that resistant and susceptible genotypes can coexist if resistance is costly, but there is mixed evidence that resistant individuals have lower fitness in the absence of parasites. One explanation for this discrepancy is that the cost of resistance varies with environmental context. We tested this hypothesis using Caenorhabditis elegans and its natural microsporidian parasite, Nematocida ironsii. We used multiple metrics to compare the fitness of two near‐isogenic host genotypes differing at regions associated with resistance to N. ironsii. To quantify the effect of the environment on the cost associated with these known resistance regions, we measured fitness on three microbial diets. We found that the cost of resistance varied with both diet and the measure of fitness. We detected no cost to resistance, irrespective of diet, when fitness was measured as fecundity. However, we detected a cost when fitness was measured in terms of population growth, and the magnitude of this cost varied with diet. These results provide a proof of concept that, by mediating the cost of resistance, environmental context may govern the rate and nature of resistance evolution in heterogeneous environments.

. A large body of theory has shown that if resistance is costly, resistant, and susceptible genotypes can stably coexist in a population (Antonovics & Thrall, 1994;Boots & Haraguchi, 1999;Gillespie, 1975). In support of this hypothesis, many empirical studies have shown that resistant hosts have reduced fitness relative to susceptible hosts in the absence of a parasite (Biere & Antonovics, 1996;Kraaijeveld et al., 2002;Tian et al., 2003).
Despite the compelling theoretical and empirical support for costs of resistance, many experiments have not found evidence of costs, suggesting that they are not universal (Gupta et al., 2016;Parker, 1990;Penley et al., 2018). A potential reason that costs are not always observed is that they may only manifest in certain environments. Several studies have found that resistance is only costly when individuals experience limited resources (Boots, 2011;Hernandez & Koskella, 2019;Kraaijeveld & Godfray, 1997). Building on this work, we sought to test whether environmental context can create variation in the cost of genomic regions that confer parasite resistance.
To assess variation in the fitness costs of parasite resistance across environments, we used the nematode Caenorhabditis elegans, which shows variation in resistance to its natural, environmentallytransmitted microsporidian parasite, Nematocida ironsii ( Figure 1).
Two quantitative trait loci (QTL) located on chromosomes II and V are associated with resistance in wild lineages of C. elegans (Balla et al., 2015;Mok et al., 2022). To test for a cost associated with these resistance QTL, we used near-isogenic lines (NILs) of C. elegans carrying either the resistant or susceptible variants on a shared genetic background (Balla et al., 2015). We compared the fitness of the resistant and susceptible NILs in the absence of N. ironsii through assays of individual fecundity and population expansion. Because bacterial diet is a key component of C. elegans natural environment and is strongly linked to population growth (Samuel et al., 2016), we compared fitness across three strains of Escherichia coli that represent qualitatively distinct diets for C. elegans. We found that the cost of resistance varied with both diet and the fitness measure used.

| Study system
Forward genetic screens with C. elegans have demonstrated that mutations that increase Nematocida resistance can simultaneously decrease other fitness components (Reddy et al., 2017(Reddy et al., , 2019. We build on this prior work by evaluating the costs of genomic regions associated with Nematocida resistance in natural lineages of C. elegans that vary in their resistance capabilities. The Hawaiian lineage CB4856 can clear N. ironsii infection from the intestinal epithelial cells during the first larval (L1) stage of development (Balla et al., 2015), while the lab-adapted lineage N2 cannot. Two QTL located on chromosomes II and V explain a large fraction of this variation in resistance (Balla et al., 2015). The resistant NIL, ERT 250, carries these resistance QTL on an N2 genetic background and was generated by the Troemel lab at UCSD (Balla et al., 2015). We acquired the susceptible host genotype, N2, from the Caenorhabditis Genetics Center (CGC).
The size and location of the resistance QTL are detailed in Balla et al. (2015). Briefly, the region on chromosome II spans the peak of the rami-1 QTL and is less than 1 Mb in size. rami-1 explains 15% of the variation in the N. ironsii clearance phenotype between N2 and CB4856. The 1.2 Mb region on chromosome V spans the peak of the rami-4 QTL, which explains 12% of the variation in clearance (Balla et al., 2015). The specific genes that confer resistance remain unknown. Each region includes many genes that would likely be inherited together under natural conditions because outcrossing only occurs in an estimated 1% of C. elegans matings (Andersen & Rockman, 2022;Barrière & Félix, 2005). Neither QTL encompasses the npr-1 locus, which has previously been reported to drive large fecundity differences between N2 and CB4856 (Andersen et al., 2014).
To simulate the variable microbial environments that C. elegans experiences in the wild, we varied diet qualitatively. We selected three different strains of the standard bacterial food Escherichia coli: OP50, DA837, and HB101. These strains differ with regard to palatability to hosts, effects on host behavior, and effects on host growth rates. The strain DA837 is considered a low-quality food F I G U R E 1 An adult C. elegans nematode surrounded by eggs and larvae (left) and a nematode infected with the intestinal parasite N. ironsii, which is labeled with red fluorescence (right). Photos by Anne Janisch.
for C. elegans because its cells clump together, making it more difficult for hosts to ingest (Brooks et al., 2009). When raised on this food, hosts roam, indicating a lack of satiety (You et al., 2008). The strain HB101 is considered a high-quality food because individuals grow faster and attain larger body sizes compared with OP50 (So et al., 2011). The strain OP50 is the standard lab food for C. elegans and is considered to be of intermediate quality relative to DA837 and HB101. Consistent with these differences, in preference tests, hosts choose HB101 over OP50, and OP50 over DA837 (Shtonda & Avery, 2006). There are, however, no substantial differences in lifespan or fecundity between individuals raised on HB101 and OP50 (Brooks et al., 2009).
Bacterial cultures were grown in LB inoculated with a single colony. NGM plates were seeded with bacteria at a concentration of 5 × 10 −7 CFU/ml and incubated overnight at 28°C.

| Fecundity assay
We conducted two assays to assess different components of fitness across diet conditions. First, to determine whether the resistant genotype has lower fecundity than the susceptible genotype, we counted the number of offspring produced by ERT250 and N2 hosts raised on the three bacterial diets. For each genotype, we isolated eggs using a standard bleach wash (Porta-de-la-Riva et al., 2012), then added approximately 100 eggs per plate to DA837-, OP50-, or HB101-seeded 100 mm plates. We allowed hosts to reach the fourth larval (L4) stage at 20°C then moved hosts individually to 35 mm plates seeded with the same bacteria as their original plate (n = 60 hosts, with one host per 35 mm plate; 10-14 hosts per genotype*food combination). We moved each host to a new plate every day for six days, at which point reproduction had finished.
Plates with eggs were incubated at 20°C for 24 h to hatch, then we counted viable offspring. We censored data from hosts that were lost or suffered damage unrelated to the test conditions (n = 4). Data from an additional three hosts were excluded from the analysis because of reporting errors.

| Population expansion assay
To test whether resistant populations grow at a slower rate than susceptible populations, we measured the size of resistant and susceptible populations after a standardized period of expansion.
To ensure sufficient replication for each treatment, we limited this assay to DA837 and HB101. For both N2 and ERT250, we picked L4 hosts individually onto 100 mm plates seeded with either DA837 or HB101 (n = 100 hosts, with one host per 100 mm plate; 25 hosts per genotype*food combination). Plates were monitored daily. The populations expanded for six days (~2-3 generations), at which point we collected entire populations in M9 buffer, diluted the populations to 14.5 ml, and counted six 20 μl aliquots for each population.
The total population size could be estimated by multiplying these aliquot counts by 725. Replicate populations were removed from the analysis if the original host died before producing offspring (n = 2) or if there was an error during the washing and resuspension steps (n = 4).

| Statistical analysis
We performed all analyses in R Version 1.4.1106 (R Core Team, 2021). To test for variation in fitness, we used the lme4 package (Bates et al., 2015) to fit generalized linear models or mixed models (GLMM). For the fecundity data, we analyzed both variations in lifetime fecundity (the total number of offspring summed over all days) and variations in the number of offspring per day, which can reveal differences in reproductive timing. For the fecundity models, we found evidence of overdispersion under the Poisson distribution, so we assumed a negative binomial distribution. We compared multiple candidate models including host genotype, food type, and their interaction as predictors. For the daily number of offspring, we also included the day of observation and its interaction with each of the aforementioned predictors, as well as a random effect to account for repeated measures of the same host. For the population expansion data, we fit Poisson GLMMs, including host genotype, food type, and their interaction as predictors of hosts per aliquot, plus a random effect for the replicate population to account for repeated measures. For all analyses, we used AIC scores to compare candidate models.

| RE SULTS
To test for environmentally-driven variation in costs of two QTL that confer parasite resistance, we compared the fitness of susceptible and resistant NILs through assays of fecundity and population expansion on three microbial diets. In the fecundity assay, we found that susceptible and resistant hosts did not differ significantly in lifetime fecundity, regardless of diet ( Figure 2a, Table 1, p > .05 for all comparisons). On DA837, resistant individuals produced slightly more offspring (302 ± 9, standard error of the mean) than susceptible individuals (288 ± 22). On the other two diets, resistant individuals produced about five percent fewer offspring than susceptible individuals (OP50: 268 ± 14 vs. 285 ± 8; HB101 267 ± 18 vs. 280 ± 18), but these differences were not statistically significant. Individuals produced slightly more offspring on DA837 (296 ± 10) than on the other food types (OP50: 277 ± 8; HB101: 274 ± 12), but these differences also were not significant (Table 1b).
Similarly, susceptible and resistant hosts did not differ in the timing of reproduction, as determined by daily counts of viable offspring ( Figure 2b, Table 2). However, the timing of reproduction did vary with food type (best model: Daily offspring count ~ Day*Food type). Hosts raised on HB101 produced over 99% of their offspring by day 3, while hosts on OP50 and DA837 had produced only 52% and 71% of their offspring, respectively, by day 3.
We then compared the size of populations of the resistant and susceptible genotypes after six days of proliferation. Population size varied with the interaction of food type and genotype (Figure 3, Table 3). On HB101, the susceptible genotype achieved a mean population size of 13,885 ± 1333, nearly twice that of the resistant genotype (7212 ± 815) (Tukey test, Z = 5.30, p < .0001, Figure 3). This result remained when the outlier in the HB101*N2 group was excluded from the analysis (Table 3c). On DA837, mean population size of the susceptible genotype was 16% larger than that of the resistant genotype, but this difference was not statistically significant (N2: 12,667 ± 756, vs. ERT250: 10,909 ± 766) ( 2 , Z = −1.41, p = .159).

| DISCUSS ION
We compared near-isogenic C. elegans lines to test whether the cost of resistance to the natural parasite Nematocida ironsii varies with environmental context. We found evidence that the cost of resistance varies with both fitness metric and host diet. We detected no cost of resistance when measuring fitness as individual fecundity ( Figure 2). However, when we allowed populations to proliferate for multiple generations, the resistant genotype reached smaller population sizes than the susceptible genotype, indicating a reduced population growth rate (Figure 3).
We only detected this cost of resistance on the diet HB101, which past literature had indicated was the highest quality of our three diets. This result contrasts with prior studies that found a cost of resistance only in food-limited contexts (Boots, 2011;Kraaijeveld & Godfray, 1997). Because we only detected this cost over multiple generations of population growth, we hypothesize that the resistant genotype has an increased sensitivity to density, manifesting as a reduced birth rate, increased development time, and/or increased death rate as density increases (

TA B L E 1 Summary of analyses for lifetime fecundity a
that individuals raised on HB101 reproduced earlier than their counterparts on other diets (Figure 2b), consistent with faster development times on HB101 reported in the literature (So et al., 2011). Thus, though total offspring numbers and population sizes on HB101 were ultimately not greater than on the other diets, the first wave of reproduction on HB101 would have rapidly increased density early in the population expansion assay.
Moreover, by day six of population growth, populations on HB101 were expected to have older, larger individuals than populations on DA837. The body volume of adult C. elegans is more than four times that of the first larval stage (Uppaluri & Brangwynne, 2015), so differences in age structure can create major differences in density when measured by body mass rather than numbers of individuals. Thus, if the resistant genotype has increased density sensitivity, we expect this cost to be more apparent on the HB101 diet than on DA837.
We chose to measure fitness through population expansion because of the ecology of C. elegans. In the wild, one to a few nematodes colonize a transient microbial resource, reproduce rapidly, predominantly via self-fertilization, then disperse to a new patch (Félix & Braendle, 2010;Richaud et al., 2018;Sloat et al., 2022).
These microbial resources are highly ephemeral, so demes that reach large population sizes quickly are expected to produce more migrants to colonize new patches. Within a patch, a C. elegans lineage reaches large population sizes quickly by having relatively high individual fecundity, early reproduction, and reduced sensitivity to TA B L E 2 Summary of analyses for daily offspring production

F I G U R E 3
The resistant genotype has reduced population size on HB101 after six days of expansion. Population size was calculated as 725 times the average number of hosts across six 20 μl aliquots per replicate population. Susceptible N2 is in light gray and resistant ERT250 is in dark gray. Error bars show the standard error of the mean.
density (Hodgkin & Barnes, 1991). Together, these components of population growth determine a genotype's contribution to the dispersal pool and its long-term persistence in the metapopulation.
Therefore, density sensitivity may represent a fitness cost of resistance that has real implications for resistance evolution in wild populations of C. elegans.
Many tests of costs of resistance in animal-disease systems have used lineages generated under artificial selection for resistance (Faria et al., 2015;Gupta et al., 2016;Penley et al., 2018) or sampled from natural populations (Auld et al., 2013;Graham et al., 2010).
The use of NILs is much rarer, although studies in plant systems have demonstrated the power of this approach (Tian et al., 2003; reviewed in Bergelson & Purrington, 1996). These studies find that the costs of resistance may be more apparent when there is greater control over the genetic background, thereby reducing the masking effect of compensatory mutations (Bergelson & Purrington, 1996).
Our study used NILs that differ at two genomic regions associated with a parasite clearance phenotype in the wild C. elegans genotype CB4856. These genomic regions were also independently identified in association with N. ironsii resistance in the Spanish C. elegans lineage JU1440 (Mok et al., 2022). Thus, in evaluating the fitness costs of these resistance regions, our work may provide general insights into the evolution of microsporidia resistance in C. elegans. These two genomic regions contain many genes, so we are unable to distinguish between pleiotropy and linkage as drivers of the observed population growth rate difference between susceptible and resistant genotypes (Fernandes et al., 2021;Gianola et al., 2015). However, outcrossing is very rare in C. elegans (Barrière & Félix, 2005), so pleiotropy and linkage may have similar consequences for the evolution of resistance (Andersen & Rockman, 2022).
In the wild, the substrates on which C. elegans live harbor diverse microbial communities (Samuel et al., 2016;Schulenburg & Félix, 2017

CO N FLI C T O F I NTE R E S T
The authors declare no conflicts of interest.

DATA AVA I L A B I L I T Y S TAT E M E N T
The study's raw data and analysis scripts are archived on Dryad (doi:10.5061/dryad.2v6wwpzsv) and on the corresponding author's GitHub repository (https://github.com/jjira nek/cost).